-
Notifications
You must be signed in to change notification settings - Fork 10
client: accept tool_results too #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Otherwise, an empty array is sent and Cohere relies on tool_results as being empty and therefore don't trigger tool_calls
@@ -34,6 +34,7 @@ def chat( | |||
frequency_penalty: nil, | |||
presence_penalty: nil, | |||
tools: [], | |||
tool_results: nil, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would personally put tool_results: []
and then below:
req.body[:tool_results] = tool_results if tool_results.any?
tools: tool, | ||
tool_results: [ | ||
{ | ||
rows: [['Ruby', 42]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct format? The docs mention the following format:
tool_results = [
{
"call": {
"name": <tool name>,
"parameters": {
<param name>: <param value>
}
},
"outputs": [{
<key>: <value>
}]
},
...
]
@yjean Do you think you could add the missing spec for the |
otherwise, the conversation_id is ignored by Cohere
To restore behavior prior to 6/10/2024 change
@yjean Just making sure you saw my comments here. |
So Cohere can provide a reply based on the results of function calling.